package com.time.company.common.gson;

import java.util.List;

/**
 * Created by Bing on 2017/8/23.
 * E-mail is tx16bing@163.com
 */

public abstract class Json {

    private static Json json;

    Json(){
    }

    public static Json get(){
        if (json == null){
            json = new GsonImpl();
        }
        return json;
    }

    public abstract String toJson(Object src);
    public abstract <T> T toObject(String json, Class<T> cls);
    public abstract <T> T toObject(byte[] bytes, Class<T> cls);
    public abstract <T> List<T> toList(String json, Class<T> cls);

}
